#include "sampler.h"
#include "buffer.h"

Sampler::Sampler()
{
}

QSharedPointer <Buffer> Sampler::getNextFrame(QSharedPointer <Buffer> buffer, QSharedPointer <QKeyMetro::TickTimedDataList> events)
{
    buffer->clear();
    if (! events->isEmpty()) {
        QSharedPointer <QKeyMetro::TickTimedData> ttd;
        foreach (ttd, *events){
            (*buffer->getData())[ttd->ticks] = 0.5;
        }
    }
    return buffer;
}
